


/* canvas图片处理 */
/**
 * cvsCtx : canvas实例
 * option : canvas参数
 * Taro : Taro 
 */
export const canvasImageCreate = async function (cvsCtx, option,Taro) {
  const info = await Taro.getImageInfo({ src: option.value })
  let width = option.width || info.width
  let height = option.height || info.height
  let positionX = option.position ? (option.position[0]) : 0
  let positionY = option.position ? (option.position[1]) : 0
  cvsCtx.drawImage(info.path, 0, 0, width, height, positionX, positionY, width, height)
}